<%@page contentType="text/html; charset=utf-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
       <title>良精团购网站管理系统</title>
   		<base href="<%=basePath%>">
		<meta http-equiv="Expires" CONTENT="0">
		<meta http-equiv="Cache-Control" CONTENT="no-cache">
		<meta http-equiv="Pragma" CONTENT="no-cache">
	<link type="text/css" rel="stylesheet" href="css/layout.css">
	<link type="text/css" rel="stylesheet" href="css/s.css">
	<link rel="stylesheet" type="text/css" href="css/styles.css">
	<script language="javascript" type="text/javascript" src="javascript/datepicker/WdatePicker.js"></script>
	<jsp:include page="WEB-INF/jsp/header.jsp"></jsp:include>
</head>
<body>
     <SCRIPT type="text/javascript">
			function sPage(url)
			{
				document.form1.action=url;//每当点查询的时候默认显示第一页
				document.form1.submit();
			}
		</SCRIPT>
<div id=main>
<div id=l style="height:800px;margin-bottom:10px;">
<ul id=nav>

<li id="nav-h" class=cur><a href="Updategood!toList.action?goodkind=0" id=app_tools target="_self" appid="12"><em class=ni-home></em>今日团购</a></li>

<li ><a href="allGood!listAllAction.action" id=app_index target="_self">所有商品</a></li>

<li ><a href="Updategood!toBuyingProgress.action" id=app_tools target="_self" appid="12">团购流程</a></li>

<li ><a href="NewsList.asp" id=app_tools target="_self" appid="12">意见反馈</a></li>

<li ><a href="About.asp?ID=7" id=app_tools target="_self" appid="12">联系我们</a></li>

</ul>
</div>
</div>
<div id=r><div id=loading>页面加载中<img src="images/loading.gif" /></div></div>
<form action="Updategood!toList.action" method="post" name="form1">
<table border="1">

	<tr bgcolor="yellow">
		<td width="120px" align="center"><a href="Updategood!toList.action?goodkind=1">美食</a></td>
		<td width="120px" align="center"><a href="Updategood!toList.action?goodkind=2">娱乐</a></td>
		<td width="120px" align="center"><a href="Updategood!toList.action?goodkind=3">旅游酒店</a></td>
		<td width="120px" align="center"><a href="Updategood!toList.action?goodkind=4">化妆品</a></td>
	</tr>

</table>

<table>
<%--
     <s:iterator value="goods" id="stats">
	<tr>
		<td><s:iterator value="goods" id="stats">
				${stats[1]}
		     </s:iterator> 
		</td>
		
		<td>
		<a href="#">${stats[1]}</a><br/>
		<img class="periodimg" src="${stats[9]}" width="500" height="300"/>
		</td>
		<td>
			<div class="periodlist">
				<p class="periodtext group_fontnine"><span class="group_fonteight"><b>${stats[11]}</b></span>人购买</p>
				<p class="graytext group_fontnine">原价：<span class="periodgray"><b>${stats[3]}</b></span></p>
				<p class="periodtext group_fontnine">折扣：<span><b>${stats[4]}</b></span></p>
				<p class="periodtext group_fontnine">现价：<span><b>${stats[2]}</b></span></p>
				<p class="periodtext group_fontnine">节省：<span><b>${stats[5]}</b></span></p>
			</div>
		</td>
	</tr>
	</s:iterator>
	
	--%>
	<s:iterator value="goods" id="good">
			<tr>
				<td>
					<a href="Updategood!getGoodDetail.action?goodId=<s:property value="goodId"/>"><s:property value="goodName"/></a><br/>
		            <img class="periodimg" src="<s:property value="goodUrl"/>" width="500" height="300"/>
				</td>
				<td>
			  <div class="periodlist">
				<%--<p class="periodtext group_fontnine"><span class="group_fonteight"><b>${stats[11]}</b></span>人购买</p>
				--%><p class="graytext group_fontnine">原价：<span class="periodgray"><b><s:property value="goodOldprice"/></b></span></p>
				<p class="periodtext group_fontnine">折扣：<span><b><s:property value="goodDiscount"/></b></span></p>
				<p class="periodtext group_fontnine">现价：<span><b><s:property value="goodPrice"/></b></span></p>
				<p class="periodtext group_fontnine">节省：<span><b><s:property value="goodSave"/></b></span></p>
			  </div>
		        </td>
		    </tr>
	</s:iterator>
			<tr>
				<th colspan="100" class="pager">

					<div class="pager">
                               
						<pg:pager url="Updategood!toList.action" maxPageItems="4" maxIndexPages="10" items="${requestScope.SPB.total}" export="currentPageNumber=pageNumber">
							<pg:first>
								<a href="javascript:sPage('${pageUrl}')">首页</a>
							</pg:first>
						    <pg:prev>
								<a href="javascript:sPage('${pageUrl}')">上一页</a>
							</pg:prev>
							<pg:pages>
							    <c:choose>
									<c:when test="${currentPageNumber eq pageNumber}">
										<font color="red">${pageNumber}</font>
									</c:when>
								  <c:otherwise>
									<a href="javascript:sPage('${pageUrl}')">${pageNumber }</a>
								  </c:otherwise>
								</c:choose>
							</pg:pages>	
							<pg:next>
								<a href="javascript:sPage('${pageUrl}')">下一页</a>
							</pg:next>
								<pg:last>
								<a href="javascript:sPage('${pageUrl}')">尾页</a>
								</pg:last>
							</pg:pager>	
								
							</div>
						</th>
			</tr>
</table>

</form>
</body>
</html>

